
const defaultFormater = (value, unit) => {
  return value + unit.label
}

const minuteSecondFormater = (value, unit) => {
  const labelAry = Array.from(unit.label)
  let val = value
  let result = ''
  for (let i = 0; i < labelAry.length - 1; i++) {
    const m = parseInt(val / 60)
    val = val - m * 60
    if (m > 0) {
      result = result + m + labelAry[i]
    }
  }
  result = result + val + labelAry[labelAry.length - 1]
  return result
}

export default {
  defaultFormater,
  minuteSecondFormater
}
